A const member function is a promise to the caller not to change the object. Put the word 'const' after the member function's signature; ex:
class X {
//...
void f() const;
};
Some programmers feel this should be a signal to the compiler that the raw bits of the object's 'struct' aren't going to change, others feel it means the *abstract* (client-visible) state of the object isn't going to change. C++ compilers aren't allowed to assume the bitwise const, since a non-const alias could exist which could modify the state of the object (gluing a 'const' ptr to an object doesn't promise the object won't change; it only promises that the object won't change **via that pointer**).
I talked to Jonathan Shopiro at the C++AtWork conference, and he confirmed that the above view has been ratified by the ANSI-C++ standards board. This doesn't make it a 'perfect' view, but it will make it 'the standard' view.